
@import "./common.css";
@import "./common-animation.css";


@property --value-opacity {
    syntax: "<number>";
    inherits: false;
    initial-value: 1;
}


:root {
    --global-content-max-width: 45rem;
    --value-opacity: 1;
}


.copyright {
    width: 10em;
}




body {
    background-image: url("/images/texture.png");
}


body > header,
.page-header {
    padding: 0.5rem;
    width: 90%;
    height: 10%;
    max-width: var(--global-content-max-width);
    min-height: 5rem;
    max-height: 10rem;
    margin: auto;

    gap: 1em;
}



body > header .header-title,
.page-header .header-title,
.page-header .page-header-title {
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
}
body > header .header-title:hover,
.page-header .header-title:hover,
.page-header .page-header-title:hover {
    transition: all 0.2s ease-in-out;
    color: var(--color-text-lighting);
}


/* header nav */
@keyframes nav-hide {
    from {
        width: 40px;
        background-position: center top, center 25%, center;
    }

    to {
        width: auto;
        background:
            linear-gradient(to right, transparent, transparent),
            linear-gradient(to right, transparent, transparent),
            linear-gradient(to right, transparent, transparent);
        background-position: center 30%, center 70%, center 100%;
    }
}


@keyframes nav-open {
    from {
        scale: 0;
    }

    to {
        scale: 1;
    }
}

@keyframes nav-close {
    0% {
        /* position: absolute;
        width: 100vw;
        height: 100vh;
        width: 100dvw;
        height: 100dvh; */
        width: 2.5rem;
        height: 2rem;
        scale: 4 3;
    }

    100% {
        width: 2.5rem;
        height: 2rem;
        scale: 1;
    }
}


@keyframes nav-item-show {
    0% {
        opacity: 0;
        scale: 0;
    }

    100% {
        opacity: 1;
        scale: 1;
    }
}


@keyframes nav-item-hide {
    0% {
        opacity: 1;
        scale: 1;
    }

    100% {
        opacity: 0;
        scale: 0;
    }
}


body > header nav.open,
.page-header nav.open,
.nav.open {
    cursor: default;
    z-index: 9999;
    background: none;
    background-color: var(--color-theme-translucent);
    position: fixed;
    right: 0%;
    top: 0%;
    /* 确保兼容性 */
    width: 100vw;
    height: 100vh;
    width: 100dvw;
    height: 100dvh;
    transform-origin: right top;
    transition: all 0.1s, background-color 0.5s;
    animation: nav-open 0.5s;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


body > header nav.open:hover,
.page-header nav.open:hover,
.nav.open:hover {
    cursor: default;
    background: none;
    background-color: var(--color-theme-translucent);
}


body > header nav.open *,
.page-header nav.open *,
.nav.open *,
.nav.open .nav-item {
    display: block;
    visibility: visible;
    transition: visibility 0s;
}


body > header nav.close,
.page-header nav.close,
.nav.close {
    animation: nav-close 0.8s;
}
body > header nav.close > *,
.page-header nav.close > *,
.nav.close > * {
    height: inherit;
}


/*
body > header nav.close *,
body > header nav.close .nav-item,
.page-header nav.close *,
.page-header nav.close .nav-item
.nav.close *,
.nav.close .nav-item {
    display: none;
}
*/


body > header nav,
.page-header nav,
.nav {
    z-index: 99;
    align-self: flex-start;
    justify-self: center;

    transform-origin: center bottom;
    transition: all 1s;

    width: 2.5rem;
    height: 2rem;
    background:
        linear-gradient(to right, var(--color-primary), var(--color-primary)),
        linear-gradient(to right, var(--color-primary), var(--color-primary)),
        linear-gradient(to right, var(--color-primary), var(--color-primary));
    background-repeat: repeat-x;
    background-size:
        1px 1px,
        1px 1px,
        1px 1px;
    background-position:
        center top,
        center,
        center bottom;
}


body > header nav:hover,
.page-header nav:hover,
.nav:hover {
    transition: all 0.2s;
    cursor: pointer;
    background-image:
        linear-gradient(to right, var(--color-text-lighting), var(--color-text-lighting)),
        linear-gradient(to right, var(--color-text-lighting), var(--color-text-lighting)),
        linear-gradient(to right, var(--color-text-lighting), var(--color-text-lighting));
}

body > header nav a,
.page-header nav a,
.nav a {
    font-size: var(--font-size-medium);
}

body > header nav *,
.page-header nav *,
.nav *,
.nav .nav-item {
    transform-origin: center top;
    visibility: hidden;
    transition: visibility 0s;
    animation: nav-item-hide 1s;
}



main {
    width: 90%;
    max-width: var(--global-content-max-width);
    margin: auto;
    margin-top: 20px;
}




body > footer,
.page-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    text-align: center;

    width: calc(100%);

    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
body > footer *,
.page-footer * {
    font-size: var(--font-size-small);
}
body > footer a,
.page-footer a {
    font-family: "宋体", 'Noto Serif SC', serif;
}



h4 {
    margin-top: 10px;
}

section {
    max-width: var(--global-content-max-width);
}


/* 分页器 */
.pagination {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 3fr 1fr;
    align-items: center;
    justify-content: center;
}

.pagination button {
    box-shadow: none;
    width: 2em;
    height: 1.5em;
    padding: 2px;
}


.pagination span {
    width: 1em;
    margin: auto;
}

.pagination input {
    text-align: center;
    width: 2em;
    height: 1.5em;
    margin: auto;
}

.pagination input::-webkit-inner-spin-button {
    display: none;
}


/* n 个 tabs-bar-tab 对应 n 个 tabs-content */
/* @keyframes  {
    
}

.tabs {
    
} */

.tabs-title {
    font-size: var(--font-size-large);
    margin-bottom: 0.5rem;
}

.tabs-title.left {
    text-align: left;
}

.tabs-title.center {
    text-align: center;
}

.tabs-title.right {
    text-align: right;
}

.tabs-bar {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    text-overflow: clip;
    margin-bottom: 0.5rem;
}

.tabs-bar::-webkit-scrollbar {
    width: auto;
    height: 0px;
}

.tabs-bar-tab {
    cursor: pointer;
    display: inline-block;
    font-size: var(--font-size-medium);
}


.tabs-bar-tab.active {
    cursor: default;
    color: var(--color-text-lighting);
    border-bottom: 2px solid var(--color-text-lighting);
    transition: all 0.5s, border 0s;
}


/* .tabs-bar-icon {

} */

@keyframes tabs-content-show {
    from { opacity: 0; }
    to {
        opacity: 1;
    }
}

.tabs-content {
    display: none;
}


.tabs-content.show {
    display: block;
    animation: tabs-content-show 0.2s;
}



.box {
    position: relative;
    width: 100%;
    /* max-width: var(--global-content-max-width); */
    padding: 20px;
    margin: auto;
}



/* 默认是 flex row */
.box-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    /* max-width: calc(var(--global-content-max-width) - 10rem); */
    padding: 20px;
    margin: auto;
}

.box-images.row {
    flex-direction: row;
}

.box-images.column {
    flex-direction: column;
    flex-wrap: nowrap;
}





/* list-lr */
.list-lr {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 1em;
}

.list-lr-item {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: 1fr;
    justify-content: space-between;
    align-items: start;
    padding: 5px;
    gap: 1em;
    overflow: hidden;
}


.list-lr-item:hover {
    cursor: pointer;
    background-color: var(--color-book-translucent);
}


.list-lr-item-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.list-lr-item-left img,
.list-lr-item-left-image,
.list-lr-item-left-img {
    box-sizing: border-box;
    position: relative;
}


.list-lr-item-right {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
    text-align: left;
}

.list-lr-item-right-title {
    font-size: var(--font-size-medium);
}


.list-lr-item-right-author {
    font-size: var(--font-size-small);
    color: gray;
}

.list-lr-item-right-detail {
    font-size: var(--font-size-small);
    color: gray;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}



/* list-article */
.list-article {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 2em;
}


.box-article-information {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;

    border-width: 0px 0px 2px 0px;
    border-style: dotted;

    position: relative;
    width: 90%;
    /* max-width: calc(var(--global-content-max-width) - 5rem); */

    margin-top: 1em;
    overflow: hidden;
}


.box-article-information-date {
    font-family: 'Noto Serif SC', serif;
    flex-grow: 1;
    font-size: var(--font-size-small);
    width: 2.2em;
    text-align: left;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;

}


.box-article-information-title {
    flex-grow: 3;
    font-size: var(--font-size-medium);
    max-width: 5em;
    max-height: 2em;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.box-article-information-sort {
    font-size: var(--font-size-medium);
    flex-grow: 1;
    text-align: right;
    min-width: 3em;
    max-width: 4em;
    text-decoration: none;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

